
<css src="hello.css"/>
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
/*echo '<p>Hello, world!</p><br/>';
phpinfo();*/
/*echo $_SERVER['HTTP_USER_AGENT']*/
/*if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
{
	echo 'MSIE: len '.strlen('MSIE').'.<br/>';
}
else
{
	echo strtoupper('Non MSIE.').'<br/>';
}*/
?>
<!-- 
<?php 
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
?>
<h3>strpos() returned non-false</h3>
<p>You're using MSIE</p>
<?php } else {?>
<h3>strpos() returned false</h3>
<p>You're using Non-MSIE</p>
<?php }?>
 -->
 
<!-- <?php 
 //echo '6: '.htmlspecialchars($_GET["id"]).'<p/>';
 //echo '6: '.$_GET["id"].'<p/>';
?> -->
 
<!--<form action="foo.php" method="post">
Name: <input type="text" name="username"/><br/>
Email: <input type="text" name="email" /><br/>
<input type="submit" name="submit" value="Submit me!" />
</form>

-->

<!--<?php 
/*$a.txt;
echo $a.txt."\n";
*/
//$data=array(1, 1., NULL, new stdClass, 'foo');
//foreach ($data as $value) {
//	echo gettype($value),"\n";
//}
 
// function get_students($obj)
//{
//    if (!is_object($obj))
//    {
//        return (false);
//    }
//
//    return ($obj->students);
//}
//$obj = new stdClass;
//$obj->students = Array('kalle', 'ross', 'felipe');
//
//var_dump(get_students(NULL));
//var_dump(get_students($obj));

 //$new = htmlentities("<a href='test'>Test</a>", ENT_QUOTES);
 // $new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
 // $new = "<a href='test'>Test</a>";
 // &lt;a href=&#039;test&#039&gt;Test&lt;/a&gt;
 //echo $new,"<br/>";

?>-->

 <!--&lt;a href=&#039;test&#039&gt;Test&lt;/a&gt;-->

<!--<form action="foo.php" method="get">
    <p>Youre name: <input type="text" name="name" /> </p>
    <p>Youre age: <input type="text" name="age"  /> </p>-->
    <!--<p><input type="submit" /> </p>
    <p><input type="image" src="go_new.gif"/> </p>
</form>
-->

<?php
    $expression=TRUE;
    if ($expression){
?>
<strong>This is true.</strong>
<script language="php">
    } else {
</script>
<strong>This is false.</strong>
<?php
    }
?>

<!--<?php //echo 1; ?>
<? echo 'simplest'; ?>
<% echo 'asp'; %>-->

<script language="php">
//    echo 'test'; 
</script>
 <!--<p>haha</p>
<h1>This is an <?php #echo 'simple';?> example.</h1>
<p>The header above will say 'This is an  example'.</p>-->

<?php
    //$a_bool = TRUE;
    //$a_str = "foo";
    //$a_str2 = 'foo';
    //$a_int = 12;
    //echo gettype($a_bool);
    //echo gettype($a_str);

    //if (is_int($a_int))
    //{
    //    $a_int += 4;
    //}
    //settype($a_bool, "string");
    //if (is_string($a_bool))
    //{
    //    echo "string: $a_bool";
    //}
    //$string = "hi, world";
    //$bs=(binary)$string;//b"hi, world";
    //echo "</p>".$string;
    //echo "</p>".$bs;
    //phpinfo();
//$foo = 10;            // $foo is an integer
//$str = "$foo";        // $str is a string
//$fst = (string) $foo; // $fst is also a string
//
//// This prints out that "they are the same"
//if ($fst === $str) {
//    echo "they are the same:$fst</br>";
//}
//$foo="5bar";
//$bar = true;
//$c = 7E-10 * 1.2e10;
//echo (string)$c."</br>";
//
//echo PHP_INT_SIZE."</br>";
//echo PHP_INT_MAX."</br>";
//var_dump(01199);
//$large_number =  2147483647;
//var_dump($large_number);
//// output: int(2147483647)
//
//$large_number =  2147483648;
//var_dump($large_number);


//echo $foo."</p>";
//echo $bar."</p>";
//settype($foo, "integer");
//settype($bar, "string");
//echo $foo."</p>";
//echo $bar."</p>";

/*
$foo = 1 + "10.5";                // $foo is float (11.5)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = 1 + "-1.3e3";              // $foo is float (-1299)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = 1 + "bob-1.3e3";           // $foo is integer (1)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = 1 + "bob3";                // $foo is integer (1)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = 1 + "10 Small Pigs";       // $foo is integer (11)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = 4 + "10.2 Little Piggies"; // $foo is float (14.2)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = "10.0 pigs " + 1;          // $foo is float (11)
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
$foo = "10.0 pigs " + 1.0;        // $foo is float (11)     
echo "\$foo==$foo; type is " . gettype ($foo) . "<br />\n";
 */

/*
$large_number =  2147483647;
var_dump($large_number);
// output: int(2147483647)

$large_number =  2147483648;
var_dump($large_number);
// output: float(2147483648)

// it's true also for hexadecimal specified integers between 2^31 and 2^32-1:
var_dump( 0xffffffff );
// output: float(4294967295)

// this doesn't go for hexadecimal specified integers above 2^32-1:
echo "0x100000000:";
var_dump( 0x100000000 );
// output: int(2147483647)

$million = 1000000;
$large_number =  50000 * $million;
var_dump($large_number);
// output: float(5000000000)

$f = 1.2345678901234e20;
var_dump($f);
var_dump((int)$f);                    // 1e10=0x2540BE400, tailed as 32-bit integer: 0x540BE400=1410065408
echo "<br/>";
$b = (0.1+0.7);
var_dump($b);
$a = $b * 10;
var_dump($a); // echoes 7!
var_dump((int)round($a));
$c=TRUE;
var_dump((float)$c);
*/

/*print ord('A');
print chr(65);*/
// phpinfo();
?>

</body>
</html>
